import { defineStore } from 'pinia';

export const useLoginStore = defineStore("login", {
    state: ()=>{
        return {
            token: "",
            permission: "",
            user: ""
        }
    },
    getters: {},
    actions: {},

    // 本地持久化储存
    persist: {
        enabled: true,
        strategies: [
            {
                key: "login", // 自定义key
                storage: localStorage
            }
        ]
    }
})